<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2020/7/26
  Time: 17:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%--<c:if test="${sessionScope.login==null}">--%>
<%--    <script>--%>
<%--        alert("管理员登陆以后才可以访问");--%>
<%--        location.href="login.jsp";--%>
<%--    </script>--%>
<%--</c:if>--%>
<c:if test="${sessionScope.loginadmin==null}">

</c:if>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="../res/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="../res/css/main.css">
    <!--加载meta IE兼容文件-->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="header">
    <div class="menu-btn">
        <div class="menu"></div>
    </div>
    <h1 class="logo">
        <a href="index.html">
            <span>MYBLOG</span>
            <img src="../res/img/logo.png">
        </a>
    </h1>
    <div class="nav">
        <a href="index" class="active">文章</a>
        <a href="/indexweiyu">微语</a>
        <a href="/indexliuyan">留言</a>
        <a href="/indexphoto">相册</a>
        <a href="/aihao">爱好</a>
        <a href="/about.jsp">关于</a>
    </div>
    <ul class="layui-nav header-down-nav">
        <li class="layui-nav-item"><a href="index" class="active">文章</a></li>
        <li class="layui-nav-item"><a href="/indexweiyu">微语</a></li>
        <li class="layui-nav-item"><a href="/indexliuyan">留言</a></li>
        <li class="layui-nav-item"><a href="/indexphoto">相册</a></li>
        <li class="layui-nav-item"><a href="/aihao.jsp">爱好</a></li>
        <li class="layui-nav-item"><a href="about.html">关于</a></li>
    </ul>
    <p class="welcome-text">
        欢迎来到<span class="name">欧尼酱</span>的博客~
    </p>
</div>

<div class="banner">
    <div class="cont w1000">
        <div class="title">
            <h3>MY<br />BLOG</h3>
            <h4>well-balanced heart</h4>
        </div>
        <div class="amount">
            <p><span class="text">访问量</span><span class="access">1000</span></p>
            <p><span class="text">日志</span><span class="daily-record">1000</span></p>
        </div>
    </div>
</div>

<div class="content">
    <div class="cont w1000">
        <div class="title">
        <span class="layui-breadcrumb" lay-separator="|">
                    <c:forEach items="${sessionScope.articletypeList}" var="cc">
                        <a href="/index?writingsid=${cc.articletypeid}"  ${cc.articletypeid==sessionScope.returnid?'class="active"':'' }>${cc.articletypename}</a>
                    </c:forEach>
             <div class="search fr"  style="display: block;float: right">
                <form action="/search" method="post">
                <div class="text fl">
                <input type="text" name="keyword" class="shuru" placeholder="标题" style="height: 35px">
                    <input type="submit" class="sousuo" style="height: 35px ;width: 60px" value="搜索"/>
                </div>
            <div class="clear"></div>
        </span>
        </div>
        <div class="list-item">
            <c:forEach items="${sessionScope.writeid}" var="cc">
            <div class="item">
                <div class="layui-fluid">
                    <div class="layui-row">
                        <div class="layui-col-xs12 layui-col-sm4 layui-col-md5">
                            <div class="img"><img src="${cc.writingsimg}" alt=""></div>
                        </div>
                        <div class="layui-col-xs12 layui-col-sm8 layui-col-md7">
                            <div class="item-cont">
                                <h3>${cc.writingstitle}<button class="layui-btn layui-btn-danger new-icon">new</button></h3>
                                <h5>${cc.writingstype}</h5>
                                <p>${cc.writingscontent}</p>
                                <a href="/details?writingsid=${cc.writingsid}" class="go-icon"></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            </c:forEach>
        </div>
        <div style="text-align: center;margin: 20px auto;">
            <div class="layui-btn-group" id="showPage">
                <a href="/indexliuyan?p=1"> <button type="button" page="1" class="layui-btn  layui-btn-primary">首页 </button></a>
                <c:forEach begin="1" end="${totalPages}" var="k">
                    <a href="/indexliuyan?p=${k}"> <button type="button" page=${k} class="layui-btn ${k==currenPage?'layui-btn-danger':'layui-btn-primary'} ">${k}</button></a>
                </c:forEach>
                <a href="/indexliuyan?p=${totalPages}"> <button type="button" page="${totalPages}" class="layui-btn  layui-btn-primary">尾页</button></a>
            </div>
        </div>
    </div>
</div>

<div class="footer-wrap">
    <div class="footer w1000">
        <div class="qrcode">
            <img src="../res/img/erweima.jpg">
        </div>
        <div class="practice-mode">
            <img src="../res/img/down_img.jpg">
            <div class="text">
                <h4 class="title">我的联系方式</h4>
                <p>微信<span class="WeChat">1234567890</span></p>
                <p>手机<span class="iphone">1234567890</span></p>
                <p>邮箱<span class="email">1234567890@qq.com</span></p>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="../res/layui/layui.js"></script>
<script type="text/javascript">
    layui.config({
        base: '../res/js/util/'
    }).use(['element','laypage','jquery','menu'],function(){
        element = layui.element,laypage = layui.laypage,$ = layui.$,menu = layui.menu;
        laypage.render({
            elem: 'demo'
            ,count: 70 //数据总数，从服务端得到
        });
        menu.init();
    })
</script>
</body>
</html>